File file = new File('.')
println file.directorySize() 
file.eachFileMatch(~/.*\.txt/) { File it-> println it.name  } //使正则表达式匹配文件名

/*
new File(".").eachFileRecurse {
	println it.getPath();
	println it.getName();
}
*/
def file = new File('1.txt')
file.eachLine {
	def ma = it =~ 'android'
	if(ma){
		println(it)
	}
}